package javase.ch03.pool.common;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class newCallableDemo {
    public static void main(String[] args) {
        ExecutorService pool = Executors.newCachedThreadPool();

        //执行任务
        pool.execute(new MyRunnable()); // pool-1-thread-1
        pool.execute(new MyRunnable()); // pool-1-thread-2
        pool.execute(new MyRunnable()); // pool-1-thread-3
        pool.execute(new MyRunnable()); // pool-1-thread-4
        pool.execute(new MyRunnable()); // pool-1-thread-5



        pool.shutdown();
    }
}
